﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="BonusPooling.aspx.cs" Inherits="Client_Revenue.BonusPooling" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h3>
       Producer Bonus Pooling</h3>
    <table style="text-align: justify; vertical-align: text-top; padding: 0px; margin: 20px 20px 20px 0px;">
        <tr>
            <td>
                <table style="text-align: justify; vertical-align: text-top; padding: 0px; margin: 20px 0px 20px 0px;">
                    <tr>
                        <td>
                            Producer
                            <asp:DropDownList ID="ddProducers" runat="server" AutoPostBack="True" AppendDataBoundItems="true"
                                OnSelectedIndexChanged="ddProducers_SelectedIndexChanged" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:GridView ID="gvBonusPooling" runat="server" CssClass="datagrid" 
                                AutoGenerateColumns="False">
                                <Columns>
                                    <asp:TemplateField HeaderText="Producer" SortExpression="LastName">
                                        <ItemTemplate>
                                            <asp:Label ID="Label1" runat="server" Text='<%#Eval("FirstName")+ " " + Eval("LastName")%>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="CommissionPooled" DataFormatString="{0:##,#}"
                                        HeaderText="% Pooled" />
                                    <asp:BoundField DataField="PooledAmount" DataFormatString="{0:c2}" 
                                        HeaderText="Pooled Amount" />
                                    <asp:BoundField DataField="InvoiceNum" HeaderText="Invoice No." />
                                    <asp:BoundField DataField="ClientName" HeaderText="Client" />
                                    <asp:BoundField DataField="DatePooled" HeaderText="Date" dataformatstring="{0:MM/dd/yy}" htmlencode="false"/>
                                </Columns>
                            </asp:GridView>
                        </td>
                    </tr>
                    <tr>
                          <td>
                              <asp:Button ID="btnExport2Excel" runat="server" Text="export to excel" OnClick="btnExport2Excel_Click"
                                            CausesValidation="False" />
                      </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</asp:Content>
